package com.itheima.hw.test5;

public class Test {

    public static void main(String[] args) {
        Computer computer = new Computer();

        Keyboard keyboard = new Keyboard();
        Mouse mouse = new Mouse();


        computer.startup();

        computer.connectionDevice( keyboard);
        computer.connectionDevice( mouse);

        computer.connectionDevice(new USB() {
            @Override
            public void connection() {
                System.out.println("连接打印机");
            }

            @Override
            public void disconnection() {
                System.out.println("断开打印机");
            }
        });



        computer.disconnectionDevice( keyboard);
        computer.disconnectionDevice( mouse);




        computer.shutdown();

    }
}
